<template>
  <a-modal
    title="详情"
    :width="550"
    :visible="visible"
    destroyOnClose
    @cancel="handleCancel"
  >
    <span class="title">
      发票金额：
      <span class="can">￥{{ omsUserInvoice.invoiceAmount | formatMoney }}</span>
    </span>

    <p
      class="title-margin"
      style="display:block;margin-top:10px">发票信息</p>
    <p class="info">
      <span>发票抬头：</span>
      <span>{{ omsUserInvoice.comName }}</span>
    </p>
    <p class="info2">
      <span>发票类型：</span>
      <span>{{ omsUserInvoice.invoiceType }}</span>
    </p>
    <p class="info">
      <span>税务登记证号：</span>
      <span>{{ omsUserInvoice.comTaxNumber }}</span>
    </p>
    <p class="info2">
      <span>基本开户银行名称：</span>
      <span>{{ omsUserInvoice.comBankName }}</span>
    </p>
    <p class="info">
      <span>基本开户账号：</span>
      <span>{{ omsUserInvoice.comBankAccount }}</span>
    </p>
    <p class="info2">
      <span>注册场所地址：</span>
      <span>{{ omsUserInvoice.comAddress }}</span>
    </p>
    <p class="info">
      <span>注册固定电话：</span>
      <span>{{ omsUserInvoice.comPhone }}</span>
    </p>

    <p class="title-margin">收件人信息</p>
    <p class="info">
      <span>收件人姓名：</span>
      <span>{{ omsUserInvoice.recipientName }}</span>
    </p>
    <p class="info2">
      <span>收件人手机号：</span>
      <span>{{ omsUserInvoice.recipientPhone }}</span>
    </p>
    <p class="info">
      <span>收件地址：</span>
      <span>{{ omsUserInvoice.mailAddress }}</span>
    </p>


    <p
      class="title-margin"
      v-show="omsUserInvoice.mailState===0">
      开票状态 :
      <span class="can"><a-radio
        defaultChecked
        disabled>待处理</a-radio></span>
      <span class="can"><a-radio disabled>已寄出</a-radio></span>
    </p>

    <p
      class="title-margin"
      v-show="omsUserInvoice.mailState===1">
      开票状态 :
      <span class="can"><a-radio disabled>待处理</a-radio></span>
      <span class="can"><a-radio
        defaultChecked
        disabled>已寄出</a-radio></span>
    </p>

    <template slot="footer">
      <a-button
        key="cancel"
        @click="handleCancel"
      >取消</a-button>
      <a-button
        key="forward"
        type="primary"
        @click="handleSubmit"
      >确定</a-button>
    </template>
  </a-modal>
</template>

<script>

import {getInvoiceRecord} from '@/api/manage'
import { formatMoney } from '@/filter/index.js'

export default {
    name: 'MoreBill',
    data() {
    return {
        visible: false,
        omsUserInvoice: {},
    }

},

computed: {
  },
  methods:{

      show(record) {
      //   console.log(record)
      //   this.mailAddrs = record

      getInvoiceRecord(record.id)
      .then(res=>{
          console.log(res)
          this.omsUserInvoice=res.resData
      })
      this.visible = true
    },
      // 取消
    handleCancel() {
      // this.form.resetFields()
      this.visible = false
    },
    // 确定
    handleSubmit() {
      this.handleCancel()
    }
  }
}

</script>

<style>
.can {
  color: #1890ff;
}
.total {
  height: 22px;
  font-size: 16px;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  line-height: 22px;
  /* margin-top: 20px; */
  margin-bottom: 20px;
}
.title {
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.85);
  line-height: 22px;
  margin-bottom: 8px;
}
.title-margin {
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.85);
  line-height: 22px;
  margin-bottom: 8px;
  margin: 24px 0 8px;
}
.info {
  height: 30px;
    line-height: 30px;
    border-radius: 3px;
    margin-bottom: 0;
    background: #f5f5f5;
  /* height: 22px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.65);
  line-height: 22px;
  margin-bottom: 0px; */
}
.info2 {
   height: 30px;
    line-height: 30px;
    border-radius: 3px;
    margin-bottom: 0;
}
</style>

